#include "CPackage.h"

namespace csmodel
{
    //-------------------------------------------

    bool PackageHasVisualNestedEntities( const CPackage & package )
    {
        return package.Nested().find_interface< CVisualEntity >() != package.Nested().end();
    }

    //-------------------------------------------

    void CPackage::GetProperties( CProperties * map )
    {
        if( PackageHasVisualNestedEntities( *this ) )
            inherited::GetProperties( map );
        else
            CEntity::GetProperties( map );
    }

    //-------------------------------------------

    ClassVisualTraits * CPackage::visualTraits = 0;

}
